<?php

	//sets the period style
	$isCurrent = $data->type == Period::$types['CURRENT'];
	$class = "unable-view-list";
	$colour = "gray";
	
	if($isCurrent) {
		$class = "view-list";
		$colour = "green";
	}
?>

<div class="view <?php echo $class;?>">
	<div class="row" style="margin-left: 8px;margin-right: 10px;">
		<span style="float: left;" > 
			<b><?php echo CHtml::encode($data->getAttributeLabel('begin_date')); ?>: </b><?php echo CHtml::encode($data->begin_date); ?><br/>
			<br/><b>	<?php echo CHtml::encode($data->getAttributeLabel('end_date')); ?>: </b><?php echo CHtml::encode($data->end_date); ?><br />
		</span>
		<span style="float:right;"> <b style="color: <?php echo $colour;?>" > <?php echo CHtml::encode($data->type); ?> </b></span>
	</div>
</div>